package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * 组织架构用户权限查看详情页
 * @author 魏荣杰
 * @date 2020/5/13 9:29 上午
 * @since permission-optimize
 * @version permission-optimize
 */
@Getter
@Setter
@ToString
public class PermissionModuleDetailDTO extends BaseDTO {
    private static final long serialVersionUID = 2773996427878027894L;

    /**
     * saasMark为1 saas应用时，以此参数标示saas应用proPermissionId,saasMark为2 以此标示paas应用id
     */
    @NotNull(message = "{dto.msg.permissionModuleDetail.appId.NotNull}")
    private Long appId;

    /**
     * 应用类型，1为saas应用，2为自建应用
     */
    @Getter(onMethod_ = {@QueryIgnore})
    @NotNull(message = "{dto.msg.permissionModuleDetail.saasMark.NotNull}")
    @Range(min = 1, max = 2, message = "{dto.msg.permissionModuleDetail.saasMark.Range}")
    private Integer saasMark;

    @NotNull(message = "{dto.msg.permissionModuleDetail.selectUserId.NotNull}")
    private String selectUserId;
}
